using System.Collections.Generic;
using Dune.Business.Managers;
using Edge.Business.Managers;
using Edge.Business.Security;

namespace Shop.Business.Domain.Customers
{
    public interface ICustomerManager : IAbstractManager<Customer, int>, IFilteredSearch<Customer, CustomerFilter>
    {
        Customer GetContactByMail(string email);

        /// <summary>
        /// return CustomerContact.NullCustomerContact if authorization failed
        /// </summary>
        /// <param name="email"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        KeyValuePair<Customer, bool>? Login(string email, string password);

        /// <summary>
        /// return true if login is empty, return false if login is busy
        /// </summary>
        /// <param name="login"></param>
        /// <param name="cc"></param>
        /// <returns></returns>

        bool LoginEmpty(string login, Customer cc);

        /// <summary>
        /// return true if login is empty, return false if login is busy
        /// </summary>
        /// <param name="login"></param>
        /// <returns></returns>

        bool LoginEmpty(string login);

    }
}